<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>封装DOM</title>
</head>
<body>
  <div>
    <div id="test">
      <span>test</span>
      <div class="red">qqqqq</div>
      <div class="red">zzzzz</div>
      <div class="red">rrrr</div>
    </div>
  </div>

  <script src="dom.js"></script>
  <script src="main.js"></script>
</body>
</html>